package club.emergency.wechat.department_staff.search;

import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Create with IntelliJ IDEA
 * Project Name: wechat
 * Package Name: club.emergency.wechat.department_staff.search
 * Date: 2019/4/2
 *
 * @author: 快乐的小菌菌
 * Description:
 */
public interface DepartmentStaffSearch {

    /**
     * 查询企业人员接口，两个参数非必传，单同时只传一个值。departmentId传的时候指向性查询该id下的所有人，
     * departmentCode传的时候查询该code及其以下的所有人
     *
     * @param departmentId   企业id
     * @param departmentCode 企业匹配字段
     * @param pageNo         当前页
     * @param pageSize       每页显示的数据数量
     * @return 以字符串形式返回
     */
    @PostMapping("/department-staff-search-provider/flipList")
    String flipList(
            @RequestParam(value = "departmentId", required = false) Long departmentId,
            @RequestParam(value = "departmentCode", required = false) String departmentCode,
            @RequestParam(value = "pageNo", required = false, defaultValue = "1") Integer pageNo,
            @RequestParam(value = "pageSize", required = false, defaultValue = "10") Integer pageSize
    );

    /**
     * 获取签名。
     *
     * @param openId 微信openId
     * @return 以字符串形式返回
     */
    @PostMapping("/department-staff-search-provider/signature")
    String signature(@RequestParam("openId") String openId);

    /**
     * 签发access_token和refreshToken
     *
     * @return 以字符串形式返回
     */
    @PostMapping("/department-staff-search-provider/updateToken")
    String updateToken();

}
